
<extend name="Common/common"/>
	
<block name='content'>
<article class="page-container">
	<form action="" method="post" class="form form-horizontal" id="form-member-add">
		<div class="row cl">
			<label class="form-label col-xs-4 col-sm-3"><span class="c-red">*</span>栏目名称：</label>
			<div class="formControls col-xs-8 col-sm-6">
				<input type="text" class="input-text" value="{$nav['task_nav_name']}" placeholder="" name="task_nav_name">
			</div>
		</div>
		<div class="row cl">
			<label class="form-label col-xs-4 col-sm-3">排序：</label>
			<div class="formControls col-xs-8 col-sm-1">
				<input style="text-align: center;" type="text" class="input-text" value="<empty name='nav'>0<else/>{$nav['sort']}</empty>" placeholder="" id="mobile" name="sort">
			</div>
		</div>
		
		<div class="row cl">
			<div class="col-xs-8 col-sm-9 col-xs-offset-4 col-sm-offset-3">
				<notempty name="nav">
				<input type="hidden" name="nav_id" value='{$nav["id"]}'/>
				</notempty>
				<input class="btn btn-primary radius" type="submit" value="&nbsp;&nbsp;提交&nbsp;&nbsp;">
			</div>
		</div>
	</form>
</article>
<script src="http://files.cnblogs.com/china-li/jquery.form.js"></script>
<script type="text/javascript">
$(function(){
	$('.skin-minimal input').iCheck({
		checkboxClass: 'icheckbox-blue',
		radioClass: 'iradio-blue',
		increaseArea: '20%'
	});
	
	$("#form-member-add").validate({
		rules:{
			task_nav_name:{
				required:true,
				minlength:2,
				maxlength:33
			},
			
		},
		onkeyup:false,
		focusCleanup:true,
		success:"valid",
		
	});
	$("#form-member-add").ajaxForm({
		type:'post',
		url:'{:U("taskNavAdd")}',
		success:function(data){
			if(data.status == 1){
				layer.msg(data.msg,{icon:6,time:1000});
				setTimeout(function(){
					var index = parent.layer.getFrameIndex(window.name);
					parent.location.reload();
					parent.layer.close(index);
				},1000);
			}else{
				layer.msg(data.msg,{icon:5,time:1000});
			}
		}
	});
});
</script> 

</block>